<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h3{
            text-align: center;
        }
        table{
            border:1px solid black;
            border-collapse: collapse;
            width:700px;
            text-align: center;
            margin:20px auto;
        }
        table td{
            border:1px solid black;
        }
    </style>
</head>

<body>
    <h3>{{ name }}</h3>
    <table>
        <thead>
            <tr>
                <td>学号</td>
                <td>姓名</td>
                <td>年龄</td>
                <td>性别</td>
            </tr>
        </thead>
        <tbody>
            {{ each lists value index }}
                <tr>
                    <td>{{ value.stuId }}</td>
                    <td>{{ value.stuName }}</td>
                    <td>{{ value.age }}</td>

                    {{ if value.sex==0 }}
                    <td style="color:red;">女</td>
                    {{ else if value.sex==1 }}
                    <td style="color:green;">男</td>
                    {{/if}}
                </tr>
            {{ /each }}
        </tbody>
    </table>
</body>

</html>